﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using RestServicesSample.Services;
using Newtonsoft.Json;
using RestServicesSample.Model;

namespace RestServicesSample
{
    public partial class ListUser : PhoneApplicationPage
    {
        public ListUser()
        {
            InitializeComponent();

            SampleApi api = new SampleApi();
            api.GetUsers(
            success => {
                //var list = JsonConvert.DeserializeObject<List<User>>(success);

                MessageBox.Show("Sucesso!"); 
            },
            fail => { 
                MessageBox.Show("Erro!"); 
            });
        }
    }
}